//
//  JZGTool.h
//  WLW
//
//  Created by TeamMac on 2017/10/19.
//  Copyright © 2017年 liutonglin. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void(^OkAlertHandler)(void);

@interface JZGTool : NSObject

/// 获取设备型号然后手动转化为对应名称
+ (NSString *_Nullable)getZLDeviceName;

// 字符串转13位时间戳
//+ (NSTimeInterval) stringToTimeIntervalBitServer:(NSString *)timeString;
/**
 *  字符串转10位时间戳
 */
+ (NSString *_Nullable) stringToTimeIntervalBitIOS:(NSString *)timeString;

/**
 *  将服务器获取的时间戳转化为本地要显示的字符串_年月日时分秒
 */
+ (NSString *_Nonnull) showFromServerIntervalString:(NSString *)serverIntervalString;
/**
 *  服务器10位时间戳转 年月日 字符串
 */
+ (NSString *_Nonnull)stringFromServerIntervalString:(NSString *)serverIntervalString;

// 判断服务器获取到的时间戳是否大于当前时间戳
+ (BOOL) isServerTimeGreaterNow:(NSString *)serverIntervalString;

/// 根据一个子view找到其所在的控制器
+ (UIViewController *)getCurrentController;

+ (UIViewController *)getCurrentVC;

/// 获取当前最顶层的控制器
+ (UIViewController *)topViewController;

/// 贝塞尔曲线画圆(传入本地图片名称)
+ (UIImageView *)BezierDrawCircleImageName:(NSString *)imageName;

/// 贝塞尔曲线画圆(传入图片控件)
+ (void)BezierDrawCircleImageView:(UIImageView *)imageView;

/// 类名转类类型
+ (Class)getClassClass:(NSString *)classNameString;

/// 任意圆角处理
+ (void)bezierPathRadiusWithView:(UIView *)view UIRectCorner:(UIRectCorner)rectCorner radius:(CGFloat)radius;

/// 简单确认弹框
+ (void)OkAlertControllerWithTitle:(NSString *)title handler:(OkAlertHandler)handler;

/// 查找入栈的控制器,返回控制器实例
+ (UIViewController *)fineControllerWithClassName:(NSString *)fineVCName nowVC:(UIViewController *)nowVC;

/// 出栈到指定的控制器
+ (void)popToControllerWithClassName:(NSString *)toVCName nowVc:(UIViewController *)nowVc;

/// 自动生成属性声明的代码
+ (void)propertyCodeWithDictionary:(NSDictionary *)dict;

/// 字典转json
+ (NSString*)dataTojsonString:(id)object;

/// json转字典
+ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;

/// 解析卓联接口文档
+ (void)ZL;

/// 修改图片颜色
+ (UIImage *_Nullable)imageWithColor:(UIColor *)color image:(UIImage *)image;

/// 颜色转图片
+ (UIImage*_Nullable)createImageWithColor:(UIColor*_Nonnull)color;

// 选择对话框
+ (void)showAlertWithVC:(UIViewController *_Nullable)vc alertTitle:(NSString *)title message:(NSString *)message actionTitle1:(NSString *)actionTitle1 actionTitle2:(NSString *)actionTitle2 actionTitle3:(NSString *)actionTitle3 actionTitle4:(NSString *)actionTitle4 handler:(void (^ __nullable)(UIAlertAction *action))handler;
@end
